package common

import (
	"strings"
)

func ContainsInt(a []int, v int) bool {
	for _, v_ := range a {
		if v_ == v {
			return true
		}
	}

	return false
}

func ContainsString(a []string, v string) bool {
	for _, v_ := range a {
		if v_ == v {
			return true
		}
	}

	return false
}

func PackStrings(a []string) []string {
	i := 0
	for _, s := range a {
		s = strings.TrimSpace(s)
		if s != "" {
			a[i] = s
			i++
		}
	}

	return a[:i]
}
